.resizable {
    flex: 0 0 auto;
    display: flex;

    &--top {
        flex-direction: column-reverse;
    }

    $handle-size: 0.165rem;

    &__handle {
        position: relative;

        opacity: 0;
        user-select: none;
        background-color: $color-border;
        transition-property: width margin-bottom margin-left opacity;
        transition-duration: 0.125s;
        transition-timing-function: ease-in-out;
        z-index: 1;

        &--right {
            height: 100%;
            width: $handle-size;
            margin-left: calc(-1 * #{$handle-size});
            cursor: ew-resize;
            top: 0;
            bottom: 0;
            right: 0;
        }
        &--top {
            width: 100%;
            height: $handle-size;
            margin-bottom: calc(-1 * #{$handle-size});
            cursor: ns-resize;
            top: 0;
            left: 0;
            right: 0;
        }

        &:hover,
        &--resizing {
            opacity: 1 !important;
        }

        &--resizing {
            filter: brightness(1.25);
        }
    }

    &__ghost {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        z-index: 999999;
        &--resizing {
            display: block;
        }
    }
}

.theme-light {
    .resizable {
        &__handle {
            background-color: $color-light-bg-5;
            &--resizing {
                filter: brightness(0.66);
            }
        }
    }
}
